/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.util.List;
import java.util.Vector;

/**
 *
 * @author daz
 */
public class Student extends Person {

    private String title;
    private int supervisorId;
    private String supervisorName;
    private int examinerId1;
    private int examinerId2;
    private int presidentId;
    private int secretaryId;
    private int additionalMemberId;
    private Professor _supervisor;
    private List<Professor> examinerList;
    private Professor _president;
    private Professor _secretary;
    private Professor _additionalMember;
    private Professor examiner1;
    private Professor examiner2;
    private Slot slot;
    private int slotId;

    public void setSlotId(int slotId) {
        this.slotId = slotId;
    }

    public int getSlotId() {
        return slotId;
    }

    public void setSlot(Slot slot) {
        this.slot = slot;
    }

    public Slot getSlot() {
        return slot;
    }

    public Student() {
    }

    public Student(int id, String name, String title, Professor supervisor, List<Professor> examiner, Professor president, Professor secretary, Professor additionalMember) {
        super(id, name);
        this.title = title;
        _supervisor = supervisor;
        examinerList = examiner;
        _president = president;
        _secretary = secretary;
        _additionalMember = additionalMember;
    }

    public void setExaminerList(List<Professor> examinerList) {
        this.examinerList = examinerList;
    }

    public List<Professor> getExaminerList() {
        return examinerList;
    }

    public String getSupervisorName() {
        return supervisorName;
    }

    public void setSupervisorName(String supervisorName) {
        this.supervisorName = supervisorName;
    }

    /**
     * @return the title
     */
    public String getTitle() {
        return title;
    }

    /**
     * @param title the title to set
     */
    public void setTitle(String title) {
        this.title = title;
    }

    public int getSupervisorId() {
        return supervisorId;
    }

    public void setSupervisorId(int supervisorId) {
        this.supervisorId = supervisorId;
    }

    /**
     * @return the examinerId1
     */
    public int getExaminerId1() {
        return examinerId1;
    }

    /**
     * @param examinerId1 the examinerId1 to set
     */
    public void setExaminerId1(int examinerId1) {
        this.examinerId1 = examinerId1;
    }

    /**
     * @return the examinerId2
     */
    public int getExaminerId2() {
        return examinerId2;
    }

    /**
     * @param examinerId2 the examinerId2 to set
     */
    public void setExaminerId2(int examinerId2) {
        this.examinerId2 = examinerId2;
    }

    /**
     * @return the presidentId
     */
    public int getPresidentId() {
        return presidentId;
    }

    /**
     * @param presidentId the presidentId to set
     */
    public void setPresidentId(int presidentId) {
        this.presidentId = presidentId;
    }

    /**
     * @return the secretaryId
     */
    public int getSecretaryId() {
        return secretaryId;
    }

    /**
     * @param secretaryId the secretaryId to set
     */
    public void setSecretaryId(int secretaryId) {
        this.secretaryId = secretaryId;
    }

    /**
     * @return the additionalMemeberId
     */
    public int getAdditionalMemberId() {
        return additionalMemberId;
    }

    /**
     * @param additionalMemeberId the additionalMemeberId to set
     */
    public void setAdditionalMemberId(int additionalMemberId) {
        this.additionalMemberId = additionalMemberId;
    }

    public Professor getSecretary() {
        return _secretary;
    }

    public Professor getAdditionalMember() {
        return _additionalMember;
    }

    public boolean juryProfessor(Professor p) {
        if (p == getPresident() || p == getSecretary() || p == getAdditionalMember()) {
            return true;
        }
        for (int i = 0; i < getExaminer().size(); i++) {
            if (p == getExaminer().get(i)) {
                return true;
            }
        }
        return false;
    }

    public void println() {
        System.out.print(id + "," + name + "," + getTitle() + "," + getSupervisor().getName() + ",");
        for (int i = 0; i < getExaminer().size(); i++) {
            System.out.print(getExaminer().get(i).getName() + ",");
        }
        System.out.println(getPresident().getName() + "," + getSecretary().getName() + "," + getAdditionalMember().getName());
    }

    public Professor getPresident() {
        return _president;
    }

    /**
     * @return the _supervisor
     */
    public Professor getSupervisor() {
        return _supervisor;
    }

    /**
     * @param supervisor the _supervisor to set
     */
    public void setSupervisor(Professor supervisor) {
        this._supervisor = supervisor;
    }

    /**
     * @return the _examiner
     */
    public List<Professor> getExaminer() {
        return examinerList;
    }

    /**
     * @param examiner the _examiner to set
     */
    /**
     * @param president the _president to set
     */
    public void setPresident(Professor president) {
        this._president = president;
    }

    /**
     * @param secretary the _secretary to set
     */
    public void setSecretary(Professor secretary) {
        this._secretary = secretary;
    }

    /**
     * @param additionalMember the _additionalMember to set
     */
    public void setAdditionalMember(Professor additionalMember) {
        this._additionalMember = additionalMember;
    }

    public void setExaminer1(Professor examiner1) {
        this.examiner1 = examiner1;
    }

    public void setExaminer2(Professor examiner2) {
        this.examiner2 = examiner2;
    }

    public Professor getExaminer1() {
        return examiner1;
    }

    public Professor getExaminer2() {
        return examiner2;
    }
}
